<template>
	<view>
		<navbar title="已成交详情" :autoBack="true"></navbar>
		<scroll-view scroll-y="true" >
			<view class="con">
				<view class="con__a">
					<view class="u-flex u-flex-y-center u-flex-between">
						<view class="con__a__t">
							审批详情
						</view>
						<view class="con__a__time">
							提单时间:{{$u.timeFormat(info.createtime, 'yyyy-mm-dd hh:MM')}}
						</view>
					</view>
					<view class="con__a__box">
						<view class="">
							姓名: {{info.name}}
						</view>
						<view class="">
							电话: {{info.phone}}
						</view>
						<view class="">
							销售: {{saleName}}
						</view>
						<view class="">
							借款金额: {{info.amount}}元
						</view>
						<view class="">
							利率: {{info.rate}}%
						</view>
						<view class="">
							借款日期: {{$u.timeFormat(new Date(info.loan_date).getTime(), 'yyyy-mm-dd')}}
						</view>
						<view class="">
							到期日期: {{$u.timeFormat(new Date(info.end_date).getTime(), 'yyyy-mm-dd')}}
						</view>
						<view class="">
							抵押方式: {{info.diya}}
						</view>
						<view class="">
							还款方式: {{info.loan_method}}
						</view>
						<view class="">
							还款日: {{info.day}}号
						</view>
						<view class="">
							月还款额: {{info.month_amount}}
						</view>
						<view class="">
							抵押物信息: {{info.diyawu}}
						</view>
						<image src="/static/tool/ywc.png" class="con__a__box__sp" mode=""></image>
					</view>
					<view class="" style="margin: 33rpx 0;">
						<titletext title="备注"></titletext>
					</view>
					<view class="con__a__text">
						{{info.remark}}
					</view>
					<view class="con__a__count" v-if="info.remark">
						{{info.remark.length}}/1000
					</view>
				</view>
				
			</view>
		</scroll-view>
		<!-- <view class="footer">
			<u-button color="#3262FD"
				:customStyle='{width:"304rpx",height:"87rpx",margin:"0 15rpx",padding:0,borderRadius:"5rpx",fontSize:"24rpx",color:"#fff"}'>通过</u-button>
			<u-button hairline plain color="#D5D5D5"
				:customStyle='{width:"304rpx",height:"87rpx",margin:"0 15rpx",padding:0,borderRadius:"5rpx",fontSize:"24rpx",color:"#242424"}'>拒绝</u-button>
		</view> -->
	</view>
</template>

<script>
	import boos from '@/api/_boos.js'
	export default {
		data() {
			return {
				info:{},
				id:null,
				saleName:''
			};
		},
		methods:{
			async getinfo(){
				let res = await boos.loanInfo({id:this.id})
				if(res.data.code==1){
					if(res.data.data.credit){
						let arr = res.data.data.credit.reverse()
						// console.log(arr)
						this.info=arr[0]
					}
					this.saleName=res.data.data.saleName
				}
			},
		},
		onLoad(o) {
			this.id=o.id
			this.getinfo()
		},
	}
</script>

<style lang="scss">
page{
	background-color: #f8f8f8;
}
.con{
	padding: 20rpx 30rpx 20rpx;
	&__a{
		background: #FFFFFF;
		border-radius: 20rpx;
		padding: 45rpx 30rpx 43rpx;
		margin-bottom: 27rpx;
		&__t{
			font-family: PingFang SC;
			font-weight: 800;
			font-size: 32rpx;
			color: #010101;
			line-height: 32rpx;
		}
		&__time{
			font-family: PingFang SC;
			font-weight: bold;
			font-size: 24rpx;
			color: #6D6D6D;
			line-height: 24rpx;
		}
		&__box{
			background: #F4F5FA;
			border-radius: 20rpx;
			margin-top: 32rpx;
			font-family: PingFang SC;
			font-weight: 500;
			font-size: 26rpx;
			color: #78797E;
			line-height: 64rpx;
			padding: 10rpx 22rpx 24rpx;
			position: relative;
			&__sp{
				width: 105rpx;
				height: 92rpx;
				position: absolute;
				top: 67rpx;
				right: 33rpx;
			}
		}
		&__text{
			font-family: PingFang SC;
			font-weight: 500;
			font-size: 24rpx;
			color: #919191;
			line-height: 36rpx;
			margin-bottom: 45rpx;
		}
		&__count{
			font-family: PingFang SC;
			font-weight: 500;
			font-size: 24rpx;
			color: #AFAFAF;
			line-height: 36rpx;
			text-align: right;
		}
	}
	&__b{
		padding: 34rpx 30rpx 32rpx;
		background: #FFFFFF;
		border-radius: 20rpx;
		display: flex;
		&__pic{
			width: 177rpx;
			height: 177rpx;
			background: #3262FD;
			border-radius: 15rpx;
			margin-right: 18rpx;
		}
		&__name{
			width: 420rpx;
			font-family: PingFang SC;
			font-weight: bold;
			font-size: 30rpx;
			color: #1E1E1E;
			line-height: 52rpx;
			margin-bottom: 6rpx;
		}
		&__text{
			width: 420rpx;
			font-family: PingFang SC;
			font-weight: 500;
			font-size: 24rpx;
			color: #7A7A7A;
			line-height: 24rpx;
			margin-bottom: 18rpx;
		}
	}
}
.footer{
	width: 750rpx;
	height: 150rpx;
	background: #FFFFFF;
	position: fixed;
	bottom: 0;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
</style>
